package common.entity.user;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import java.util.Date;

/**
 * @Author: 郑国荣
 * @Date: 2023-12-31-18:31
 * @Description: 用户实体类
 */
@Data
//@ApiModel(value="User对象", description="用户信息表")
@TableName("user_info")
public class User {
    @TableId(value = "user_id")
    private String userId;
//    @ApiModelProperty(value = "用户名")
    @TableField("user_nick")
    private String userNick;
//    @ApiModelProperty(value = "密码")
    @TableField("password")
    private String pwd;
//    @ApiModelProperty(value = "密码盐")
    @TableField("password_salt")
    private String pwdSalt;
//    @ApiModelProperty(value = "手机号")
    @TableField("mobile_phone")
    private String mobilePhone;
//    @ApiModelProperty(value = "注册ip")
    @TableField("register_ip")
    private String registerIp;
//    @ApiModelProperty(value = "更新ip")
    @TableField("update_ip")
    private String updateIp;
//    @ApiModelProperty("更新时间")
    @TableField(value="update_time", fill = FieldFill.INSERT) //创建时自动填充
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;
//    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT_UPDATE) //创建时自动填充
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    // 如果为空，可忽略
    @TableField(value = "status", insertStrategy = FieldStrategy.DEFAULT, updateStrategy = FieldStrategy.DEFAULT)
    private int status;
}
